﻿@using Abp.Authorization.Users
@model AbpCompanyName.AbpProjectName.WebSpaAngular.Models.Account.RegisterViewModel
@section Styles
{
    <link href="~/Views/Account/Login.css" rel="stylesheet" />
}
@section Scripts{
    <script type="text/javascript" src="~/Views/Account/Register.js"></script>
}
<div class="card">
    <div class="body">
        <form id="RegisterForm" asp-action="Register" method="POST">
            <h4 class="text-center">@L("Register")</h4>

            @Html.AntiForgeryToken()

            @if (@ViewBag.ErrorMessage != null)
            {
                <div class="alert alert-danger">
                    <i class="fa fa-warning"></i> @ViewBag.ErrorMessage
                </div>
            }

            <input type="hidden" name="IsExternalLogin" value="@Model.IsExternalLogin.ToString()" />
            <input type="hidden" name="ExternalLoginAuthSchema" value="@Model.ExternalLoginAuthSchema" />

            <div class="form-group form-float">
                <div class="form-line">
                    <input type="text" class="form-control" name="Name" value="@Model.Name" required maxlength="@AbpUserBase.MaxNameLength">
                    <label class="form-label">@L("Name")</label>
                </div>
            </div>

            <div class="form-group form-float">
                <div class="form-line">
                    <input type="text" class="form-control" name="Surname" value="@Model.Surname" required maxlength="@AbpUserBase.MaxSurnameLength">
                    <label class="form-label">@L("Surname")</label>
                </div>
            </div>

            <div class="form-group form-float">
                <div class="form-line">
                    <input type="email" class="form-control" name="EmailAddress" value="@Model.EmailAddress" required maxlength="@AbpUserBase.MaxEmailAddressLength">
                    <label class="form-label">@L("EmailAddress")</label>
                </div>
            </div>

            <div class="form-group form-float">
                <div class="form-line">
                    <input type="text" class="form-control" name="UserName" value="@Model.UserName" required maxlength="@AbpUserBase.MaxUserNameLength">
                    <label class="form-label">@L("UserName")</label>
                </div>
            </div>

            <div class="form-group form-float">
                <div class="form-line">
                    <input type="password" class="form-control" name="Password" required maxlength="@AbpUserBase.MaxPlainPasswordLength">
                    <label class="form-label">@L("Password")</label>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12">
                    <a href="@Url.Action("Login", "Account")" cl class="btn btn-default waves-effect">@L("Back")</a>
                    <button id="RegisterButton" class="btn bg-pink waves-effect" type="submit">@L("Register")</button>
                </div>
            </div>
        </form>
    </div>
</div>